package com.st.event.demo.source.impl;

import com.st.event.demo.enums.HandlerEnum;
import com.st.event.demo.source.AbstractEventAnnotationSourceParser;
import com.st.event.demo.source.EventAttribute;
import org.springframework.core.annotation.AnnotationAttributes;


public class DefaultEventAnnotationSourceParser extends AbstractEventAnnotationSourceParser {

    @Override
    protected EventAttribute parsePayAnnotation(AnnotationAttributes attributes) {
        System.out.println("执行11-----------");
        String methodName = attributes.getString(METHOD_NAME);
        String triggerBeanName = attributes.getString(TRIGGER_BEAN_NAME);
        HandlerEnum handlerEnum = attributes.getEnum(HANDLER_ENUM);
        return new DefaultEventAttribute(triggerBeanName, methodName, handlerEnum);
    }
}
